home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / TestParts / Clock / Clock.xh < prev    next >
Encoding:
Text File  |  1997-01-01  |  3.7 KB  |  173 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Clock.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_Module_AppleTest_defined
  11. #define SOM_Module_AppleTest_defined 1
  12. #include <som.xh>
  13.  
  14. /*
  15.  * Start of user-defined types:
  16.  */
  17. class SOMClass;
  18. class SOMObject;
  19. class ODFrame;
  20. class ODFacet;
  21. class ODObject;
  22. class ODExtension;
  23. class ODRefCntObject;
  24. class ODPersistentObject;
  25. class ODStorageUnit;
  26. class ODPart;
  27. class ODCanvas;
  28. class ODDragItemIterator;
  29. class ODEmbeddedFramesIterator;
  30. class ODLink;
  31. class ODLinkSource;
  32. class ODObjectSpec;
  33. class ODShape;
  34. class ODStorageUnitView;
  35. class ODTypeList;
  36. class ODMenuBar;
  37. class ODFocusSet;
  38. class ODSession;
  39. class ODWindow;
  40. class ODSemanticInterface;
  41.  
  42. /*
  43.  * End of user-defined types.
  44.  */
  45. #endif /* SOM_Module_AppleTest_defined */
  46.  
  47. #ifndef SOM_AppleTest_Clock_xh
  48. #define SOM_AppleTest_Clock_xh
  49.  
  50. class AppleTest_Clock;
  51.  
  52. #define AppleTest_Clock_MajorVersion 1
  53. #define AppleTest_Clock_MinorVersion 0
  54.  
  55. /* C++ SOM defs */
  56. #include <somcls.xh>
  57. #include <somcm.xh>
  58.  
  59. /* C++ parent defs */
  60. #ifndef SOM_ODPart_xh
  61. #include <Part.xh>
  62. #endif
  63.  
  64. #ifndef AppleTest_Clock_API
  65. #define AppleTest_Clock_API
  66. /*
  67.  * -- The Class API
  68.  */
  69.  
  70. /*
  71.  * Start of user-defined types:
  72.  */
  73.  
  74. /*
  75.  * End of user-defined types.
  76.  */
  77.  
  78. #ifdef OLDIBMSOMAPISUPPORT
  79. #define AppleTest_ClockCClassData AppleTest_ClockClassData
  80. #define AppleTest_ClockNewClass(major,minor) somNewVersionedClassReference(AppleTest_Clock,major,minor)
  81. #endif
  82.  
  83. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  84. #define AppleTest_ClockMetaClass SOMClass
  85.  
  86. #if PRAGMA_ALIGN_SUPPORTED
  87. #  pragma options align=power
  88. #endif
  89.  
  90. /* The API to the AppleTest_Clock class object, and the methods it introduces. */
  91. SOMEXTERN struct AppleTest_ClockClassDataStructure {
  92. #ifdef OLDIBMSOMAPISUPPORT
  93.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  94. #else
  95.     long zero;
  96. #endif
  97.     somStaticClassInfo *sci;
  98.     somDToken        instanceDataToken;
  99.     long reserved [3];
  100. } SOMDLINK AppleTest_ClockClassData;
  101.  
  102. #if PRAGMA_ALIGN_SUPPORTED
  103. #  pragma options align=reset
  104. #endif
  105.  
  106. #if !defined(AppleTest_Clock_Class_Source) && !defined(SOM_Module_clock_Source)
  107. #if PRAGMA_IMPORT_SUPPORTED
  108. #pragma import list AppleTest_ClockClassData
  109. #endif
  110. #endif
  111.  
  112.  
  113. /*
  114.  * -- Typedefs and inline method declarations for left path inherited methods
  115.  * -- are omitted because this compilation had -museinheritedmethods in effect
  116.  */
  117.  
  118.  
  119. /*
  120.  * -- Typedefs for AppleTest_Clock Method Procedures
  121.  */
  122. SOMEXTERN {
  123. }
  124.  
  125. #endif /* AppleTest_Clock_API */
  126.  
  127.  
  128. /*
  129.  * -- This emitter treats Method Tokens as Thunks by default.
  130.  * -- Use the sc modifier "nothunks" to change this default
  131.  */
  132. #undef somresolve_
  133. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  134.  
  135. /*
  136.  * -- The C++ Wrapper Class for AppleTest_Clock
  137.  */
  138. class AppleTest_Clock : public ODPart
  139. {
  140. public:
  141.  
  142. // AppleTest_Clock::new registers use of the class object, and then uses somNew
  143. // to allocate memory and load the object method table pointer. 
  144. void *operator new(size_t size)
  145. {
  146.     SOM_IgnoreWarning(size);
  147.     // Allocate memory using the default allocator for AppleTest_Clock, and
  148.     // clear mem & set method table pointer, call basic initialization
  149. #ifdef SOMCHKNULL
  150.     void * __somResult = (void *)
  151.       somNewObject(AppleTest_Clock);
  152.     SOMCHKNULL(__somResult);
  153.     return __somResult;
  154. #else
  155.     return (void*) somNewObject(AppleTest_Clock);
  156. #endif
  157. }
  158.  
  159. // AppleTest_Clock::delete uses the default deallocator for the object's class.
  160. void operator delete(void * obj)
  161. {
  162.     if (obj) {
  163.         SOM_Resolve(obj,SOMObject,somFree)
  164.            ( (SOMObject*) obj );
  165.     }
  166. }
  167.  
  168. };   /* AppleTest_Clock */
  169.  
  170.  
  171.  
  172. #endif       /* SOM_AppleTest_Clock_xh */
  173.